﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PeekService;

namespace PeekWebApp.Management.AjaxHandler
{
    /// <summary>
    /// CheckUserRegistryEmail 的摘要说明
    /// </summary>
    public class CheckUserRegistryEmail : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json";
            string name = context.Request["email"];
            string code = context.Request["id"];
            if (code != "-1")
            {
                context.Response.Write("true");
            }
            else
            {
                string isExsits = new ExtendService().CheckExistByOneColumn("UserRegistry", "Email", DecryptService.Encrypt(name));
                context.Response.Write(isExsits);
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}